<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title><?php echo $title; ?></title>
        <base href="<?php echo $base; ?>" />
        <?php if ($description) { ?>
            <meta name="description" content="<?php echo $description; ?>" />
        <?php } ?>
        <?php if ($keywords) { ?>
            <meta name="keywords" content="<?php echo $keywords; ?>" />
        <?php } ?>
        <?php if ($icon) { ?>
            <link href="<?php echo $icon; ?>" rel="icon" />
        <?php } ?>
        <?php foreach ($links as $link) { ?>
            <link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
        <?php } ?>
        <link type="text/css" rel="stylesheet" href="catalog/view/theme/tablet/stylesheet/jqmop.min.css" />
        <link type="text/css" rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile.structure-1.0.1.min.css" />
        <?php #<link rel="stylesheet" type="text/css" href="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.css" /> ?>
        <link rel="stylesheet" type="text/css" href="catalog/view/theme/tablet/stylesheet/jqmop.simpledialog.min.css" />

        <?php foreach ($styles as $style) { ?>
            <link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
        <?php }
        echo $google_analytics; ?>
        <link rel="stylesheet" type="text/css" href="catalog/view/theme/tablet/stylesheet/stylesheet.css" media="screen" />
        <?php if (isset($this->request->get['route']) && $this->request->get['route'] == 'product/product') { ?>
            <link rel="stylesheet" type="text/css" href="catalog/view/theme/tablet/stylesheet/photoswipe/photoswipe.css" />
        <?php } ?>
    </head>
    <body>
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
        <script type="text/javascript"><!--
<?php
if (isset($this->request->get['route']) &&
        ($this->request->get['route'] != 'checkout/cart') &&
        ($this->request->get['route'] != 'checkout/checkout') &&
        ($this->request->get['route'] != 'account/register') &&
        ($this->request->get['route'] != 'affiliate/register')) {
    ?>
            $(document).ready(function() {
                $.mobile.ajaxEnabled = false;
            });
<?php } ?>
    $(document).ready(function() {
        $("a").attr("rel", "external");
        $(".fancybox").removeAttr("rel");
    });
    //--></script>
        <script type="text/javascript" src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
        <script type="text/javascript" src="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.js"></script>
        <?php #<script type="text/javascript" src="catalog/view/theme/tablet/javascript/jqmop.simpledialog.min.js"></script> ?>
        <script type="text/javascript" src="catalog/view/javascript/jquery/ui/external/jquery.cookie.js"></script>
        <script type="text/javascript" src="catalog/view/theme/tablet/javascript/common.js"></script>
        <?php foreach ($scripts as $script) { ?>
            <script type="text/javascript" src="<?php echo $script; ?>"></script>
        <?php }
        if (isset($this->request->get['route']) && $this->request->get['route'] == 'product/product') { ?>
            <script type="text/javascript" src="catalog/view/javascript/jquery/photoswipe/klass.min.js"></script>
            <script type="text/javascript" src="catalog/view/javascript/jquery/photoswipe/code.photoswipe.jquery-3.0.4.min.js"></script>
            <?php
        }
        ?>
        <div data-role="page" data-theme="a">
            <div data-role="header" class="header"<?php echo ($tablet_fixed ? ' data-position="fixed"' : ''); ?>>
                <div class="ui-grid-b">
                    <div class="ui-block-a" style="width: 30%">
                        <?php if ($tablet_logo) { ?>
                            <a href="<?php echo $home; ?>">
                                <img src="<?php echo $tablet_logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" />
                            </a>
                        <?php } ?>
                    </div>
                    <div class="ui-block-b" style="width: 45%">
                        <div data-role="controlgroup" data-type="horizontal">
                            <a data-icon="home" data-role="button" data-theme="c" href="<?php echo $home; ?>"><?php echo $text_home; ?></a>
                            <a data-icon="star" data-role="button" data-theme="c" href="<?php echo $wishlist; ?>" id="wishlist-total"><?php echo $text_wishlist; ?></a>
                            <a data-icon="grid" data-role="button" data-theme="c" href="<?php echo $account; ?>"><?php echo $text_account; ?></a>
                            <a data-icon="myapp-cart" data-role="button" data-theme="c" href="<?php echo $shopping_cart; ?>"><?php echo $text_shopping_cart; ?></a>
                            <a data-icon="check" data-role="button" data-theme="c" href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a>
                        </div>
                    </div>
                    <div class="ui-block-c" style="text-align: right; width: 25%">
                        <input data-theme="c" placeholder="<?php echo $text_search; ?>" type="search" name="filter_name" value="<?php echo (isset($filter_name) && $filter_name ? $filter_name : (isset($search) && $search ? $search : '')); ?>" />
                    </div>
                </div>
                <div align="center">
                    <?php echo $currency;
                    if ($categories) { ?>
                        <div data-role="controlgroup" data-type="horizontal" align="center" style="display: inline-block">
                            <?php foreach ($categories as $category) { ?>
                                <a data-role="button" data-theme="b" href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
                            <?php } ?>
                        </div>
                    <?php } ?>
                    <?php echo $language; ?>
                </div>
            </div>
            <div id="notification"></div>
